Skip to content

docs: fix environment variable name for Gemini API #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

lacolaco
Copy link

I followed the guide on genkit-angular-starter-kit/README.md but GEMINI_API_KEY env var doesn't work. As the error says, the correct var name is now GOOGLE_GENAI_API_KEY.

Non-streaming request failed with error: Please pass in the API key or set the GOOGLE_GENAI_API_KEY or GOOGLE_API_KEY environment variable.
For more details see https://firebase.google.com/docs/genkit/plugins/google-genai
Error: Please pass in the API key or set the GOOGLE_GENAI_API_KEY or GOOGLE_API_KEY environment variable.
For more details see https://firebase.google.com/docs/genkit/plugins/google-genai
    at defineGoogleAIModel2 (/Users/lacolaco/works/angular/examples/genkit-angular-starter-kit/.angular/cache/19.2.5/app/vite/deps_ssr/@genkit-ai_googleai.js:2699:15)

I confirmed it works with GOOGLE_GENAI_API_KEY on my machine.

@devchas
Copy link
Collaborator

devchas commented Apr 29, 2025

Thank you for this PR @lacolaco. I connected with some folks on the Genkit team, and it looks like they added support for GEMINI_API_KEY env var in 1.0.5, and that this will be the preferred env var going forward. Upgrading your Genkit version should resolve the issue.

@devchas devchas closed this Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants